package com.sky.demo.rmi;

import java.rmi.Naming;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;

public class ServerMain {

    public static void main(String[] args) throws Exception {
        HelloService helloService = new HelloServiceImpl();
        LocateRegistry.createRegistry(8801);

        Naming.bind("rmi://localhost:8801/helloService", helloService);
        System.out.println("ServerMain provide RPC service now");
    }
}
